package com.yue.yadmin.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class SysMenuDto2 implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private List<SysMenuDto> menus ;
	
	private List<SysMenu> buttons ;

	public SysMenuDto2() {
		super();
		this.menus = new ArrayList<SysMenuDto>();
		this.buttons = new ArrayList<SysMenu>();
	}

	public List<SysMenuDto> getMenus() {
		return menus;
	}
	public SysMenuDto getMenu(int index){
		if(menus==null||menus.size()<=index)return null;
		return menus.get(index);
	}
	public void setMenus(List<SysMenuDto> menus) {
		this.menus = menus;
	}
	public void addMenu(SysMenuDto menu){
		if(this.menus==null)this.menus = new ArrayList<SysMenuDto>();
		menus.add(menu);
	}

	public List<SysMenu> getButtons() {
		return buttons;
	}

	public void setButtons(List<SysMenu> buttons) {
		this.buttons = buttons;
	}
	
	public void addButton(SysMenu button){
		if(this.buttons==null)this.buttons = new ArrayList<SysMenu>();
		buttons.add(button);
	}

	@Override
	public String toString() {
		return "SysMenuDto2 [menus=" + menus + ", buttons="
				+ buttons + "]";
	}

}
